//
//  Publish.swift
//  yaokongqi
//
//  Created by HappyMilk 02 on 2017/9/26.
//  Copyright © 2017年 nike. All rights reserved.
//

import Foundation
import UIKit


func TABBARIMAGE( name: String) ->UIImage {
    return (UIImage.init(named: name)?.withRenderingMode(.alwaysOriginal))!
}

func HEXCOLOR(_ rgbValue: Int) -> UIColor{
    return UIColor.init(colorLiteralRed: (Float((rgbValue & 0xFF0000) >> 16))/255.0, green: (Float((rgbValue & 0xFF00) >> 8))/255.0, blue: (Float(rgbValue & 0xFF))/255.0, alpha: 1.0)
}

let ScreenWidth = UIScreen.main.bounds.width
let ScreenHeight = UIScreen.main.bounds.height

func is_chinese() ->Bool{
    return (NSLocale.preferredLanguages.first?.contains("zh-Han"))!
}

//func is_pass() ->Bool{
//    if (MPWeChat.stander().m_adStatus>0 || MPWeChat.stander().m_needLogin) {
//        return true
//    }
//    return false
//}

func is_ipad() ->Bool{
    if UIDevice.current.userInterfaceIdiom == .pad {
        return true
    }
    return false
}
